﻿
Imports osi.interface.storage

Public Class base_accessor(Of T As accessor_settings)
    Implements base_accessor_t
    Private ReadOnly s As T = Nothing

    Protected Sub New(ByVal settings As T)
        Me.s = check_resolve_or_alloc(settings)
    End Sub

    Public Function settings() As accessor_settings Implements base_accessor_t.settings
        Return typed_settings()
    End Function

    Public Function typed_settings() As T
        Return s
    End Function
End Class

Public Module _accessor
    Public Function accessor() As accessor_t
        Return resolve(Of accessor_t)()
    End Function
End Module